<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Datenbank</title>
<template>admin.html</template>
<parent_url>/system-admin</parent_url>
<usergroup>10</usergroup>
</head>

<body>
<p><a href="[system.base_url]/datenbank-neue-tabelle">Neue Tabelle</a></p>
<!--<p><a href="[system.base_url]/datenbank-neue-nm-tabelle">Neue nm Tabelle</a></p>-->
<table width="100%" border="1">
  <tr>
    <td width="15%" valign="top"><ul com="data" table="_table" where="system_table=0" orderby="table_caption" property_modus="false">
        <li> <a href="?id=[id]">[table_caption]</a></li>
        </ul>
      <p><strong>System Tabellen</strong></p>
      <p>
        <input type="checkbox" name="checkbox" id="checkbox" click="jquery_toggle" set_id="system_table" />
        <label for="checkbox">System Tabellen anzeigen</label>
      </p>
      
      <ul id="system_table" com="data" table="_table" orderby="table_caption" where="system_table=1" property_modus="false">
        <li> <a href="?id=[id]">[table_caption]</a></li>
        </ul>
      
      </td>
    <td width="85%" valign="top"><div com="detail_data" table="_table" id="[get:id]" var="detail_table" property_modus="false">detail</div>
      <h3>[detail_table.table_caption] </h3>
      <p><a href="[system.base_url]/datenbank-neue-tabellen-feld?table=[detail_table.table_name]">Neue Tabellen Feld</a></p>
      <p><a href="[system.base_url]/datenbank-neues-verknuepfungsfeld?table=[detail_table.table_name]">Neues Verknüpfungsfeld</a></p>
      <p><a href="[system.base_url]/datenbank-neues-spezialfeld?table=[detail_table.table_name]">Neues Spezialfeld</a>      </p>
      <table width="100%" border="1">
        <tr>
          <th scope="col">Field Caption</th>
          <th scope="col">Field Name</th>
          <th scope="col">Field Type</th>
          <th scope="col">Image Size</th>
          <th scope="col">List</th>
          <th scope="col">Unique Index</th>
          <th scope="col">Search Index</th>
          <th scope="col">Table Visible</th>
          <th scope="col">Form Visible</th>
          <th scope="col">Detail Visible</th>
          <th scope="col">Required</th>
          <th scope="col">Error Message</th>
          <th scope="col">Join Field</th>
          <th scope="col">Default Value</th>
          <th scope="col">&nbsp;</th>
          <th scope="col">&nbsp;</th>
        </tr>
        <tbody id="table_sort" com="data_sortable" table="_table_field,_field_type" where="__table='[detail_table._table_id]'" property_modus="false" var="table_field_list">
          <tr id="[_table_field_id]">
            <td>[field_caption]</td>
            <td>[field_name]</td>
            <td>[field_type]</td>
            <td>
            
            <?php
    if (($table_field_list['field_type'] == "image") or ($table_field_list['field_type'] == "image_url")) {
?>
            
            <ul com="data" table="_table_field_image" where="__table_field='[_table_field_id]'" orderby="image_size" property_modus="false">
              <li>[image_size] - [fix_height] - [fix_width]<a href="" com="delete_data" table="_table_field_image" id="[_table_field_image_id]" property_modus="false">löschen</a></li>
              </ul>
              <form id="form2" name="form2" method="post" action="" com="save_form" table="_table_field_image" property_modus="false">
                <p>
                  <label for="textfield"></label> 
                  <input type="text" name="image_size" id="image_size" />
                   <br />
                  <label for="fix_height">
                    <input type="checkbox" name="fix_height" id="fix_height" />
                    Fix Height </label>
                  <br />
                  <label for="fix_width">
                    <input type="checkbox" name="fix_width" id="fix_width" />
                    Fix Width</label>
                  <br />
<input type="submit" name="button2" id="button2" value="ok" />
                  
                  <input name="__table_field" type="hidden" id="__table_field" value="[_table_field_id]" />
                </p>
</form>
              
              <?php
    } else {
        echo "&nbsp;";
    }
?>
              
              
              </td>
            <td><ul com="data" table="_table_field_list" where="__table_field='[_table_field_id]'" orderby="list" property_modus="false">
              <li>[list] <a href="" com="delete_data" table="_table_field_list" id="[_table_field_list_id]" property_modus="false">löschen</a></li>
              </ul>
              <form id="form2" name="form2" method="post" action="" com="save_form" table="_table_field_list" property_modus="false">
                <label for="textfield"></label> 
                <input type="text" name="list" id="list" />
                <label for="value">
                  <input type="submit" name="button2" id="button2" value="ok" />
                </label>
                <input name="__table_field" type="hidden" id="__table_field" value="[_table_field_id]" />
              </form></td>
            <td>[unique_index]</td>
            <td>[search_index]</td>
            <td>[table_visible]</td>
            <td>[form_visible]</td>
            <td>[detail_visible]</td>
            <td>[required]</td>
            <td>[error_message]</td>
            <td>[join_field]</td>
            <td>[default_value]</td>
            <td><a href="[system.base_url]/datenbank-tabellen-feld-editieren?id=[_table_field_id]">edit</a></td>
            <td><a href="" com="delete_table_field" table="[detail_table.table_name]" field="[field_name]" property_modus="false">delete</a></td>
          </tr>
        </tbody>
      </table>
      <h3>Tabellen Eigenschaften</h3>
      <table width="70%" border="0">
        <tr>
          <td width="184">Table Name</td>
          <td width="806"><strong>[detail_table.table_name]</strong></td>
        </tr>
        <tr>
          <td>Table Caption</td>
          <td><strong>[detail_table.table_caption]</strong></td>
        </tr>
        <tr>
          <td>Usergroup</td>
          <td><strong>[detail_table.usergroup]</strong></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Scaffolding</td>
          <td><strong>[detail_table.scaffolding]</strong></td>
        </tr>
        <tr>
          <td>Backup Table</td>
          <td><strong>[detail_table.backup_table]</strong></td>
        </tr>
        <tr>
          <td>Url Table</td>
          <td><strong>[detail_table.url_table] (Field: [detail_table.url_field], Pre Url: [detail_table.pre_url])</strong></td>
        </tr>
        <tr>
          <td>Source Url </td>
          <td><strong>[detail_table.source_url]</strong></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>User Table</td>
          <td><strong>[detail_table.user_table]</strong></td>
        </tr>
        <tr>
          <td>Default Usergroup</td>
          <td><strong>[detail_table.default_usergroup]</strong></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Sortable Table</td>
          <td><strong>[detail_table.sortable_table]</strong></td>
        </tr>
        <tr>
          <td>File Table</td>
          <td><strong>[detail_table.file_table]</strong></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Search Form</td>
          <td><strong>[detail_table.search_form]</strong></td>
        </tr>
        <tr>
          <td>CSV Import</td>
          <td><strong>[detail_table.csv_import]</strong></td>
        </tr>
        <tr>
          <td>CSV Export</td>
          <td><strong>[detail_table.csv_export]</strong></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Table Where</td>
          <td><strong>[detail_table.table_where]</strong></td>
        </tr>
        <tr>
          <td>Table Orderby</td>
          <td><strong>[detail_table.table_orderby]</strong></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Main Field Caption</td>
          <td><strong>[detail_table.main_field_caption]</strong></td>
        </tr>
        <tr>
          <td>Main Field</td>
          <td><strong>[detail_table.main_field]</strong></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><strong>Form Titel</strong></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Form Titel (Insert)</td>
          <td><strong>[detail_table.form_title_insert]</strong></td>
        </tr>
        <tr>
          <td>Form Titel (Update)</td>
          <td><strong>[detail_table.form_title_update]</strong></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><strong>PHP Script (Insert/Update)</strong></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Php Script (Previous)</td>
          <td><strong>[detail_table.php_script_previous]</strong></td>
        </tr>
        <tr>
          <td>Php  Script (After)</td>
          <td><strong>[detail_table.php_script_after]</strong></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><strong>PHP Script (Insert)</strong></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Php Script (Previous)</td>
          <td><strong>[detail_table.php_script_previous_insert]</strong></td>
        </tr>
        <tr>
          <td>Php  Script (After)</td>
          <td><strong>[detail_table.php_script_after_insert]</strong></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><strong>PHP Script (Update)</strong></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Php Script (Previous)</td>
          <td><strong>[detail_table.php_script_previous_update]</strong></td>
        </tr>
        <tr>
          <td>Php  Script (After)</td>
          <td><strong>[detail_table.php_script_after_update]</strong></td>
        </tr>
      </table>
      <p><br />
        <label for="textfield2"></label>
      <strong>Mail</strong></p>
      <form id="form1" name="form1" method="post" action="" com="save_form" table="_table_mail" property_modus="false">
        <label for="__mail"></label>
        <select name="__mail" id="__mail" com="data_select" table="_mail" orderby="subject" field="filename,subject">
        </select>
        <input type="submit" name="button" id="button" value="Speichern" />
        <input name="__table" type="hidden" id="__table" value="[detail_table._table_id]" />
      </form>
      <table width="100%" border="1">
        <tr>
          <th scope="col">Filename</th>
          <th scope="col">Subject</th>
          <th scope="col">Mail To</th>
          <th scope="col">Mail From</th>
          <th scope="col">&nbsp;</th>
          <th scope="col">&nbsp;</th>
        </tr>
        <tbody com="data" table="_table_mail,_mail" where="__table='[detail_table._table_id]'" property_modus="false">
        <tr>
          <td>[filename]</td>
          <td>[subject]</td>
          <td>[mail_to]</td>
          <td>[mail_from]</td>
          <td>editieren</td>
          <td><a href="" click="delete_data" table="_table_mail" id="[_table_mail_id]">löschen</a></td>
        </tr>
        </tbody>
      </table>
      <p><strong>nm Tabelle</strong></p>
      <form id="form3" name="form3" method="post" action="" com="create_nm_table" property_modus="false">
        <label for="m_table"></label>
        <select name="m_table" id="m_table" com="data_select" table="_table" orderby="table_name" field="table_name" field_value="table_name">
        </select>
        <input type="submit" name="button3" id="button3" value="Speichern" />
        <input name="n_table" type="hidden" id="n_table" value="[detail_table.table_name]" />
      </form>
      <table width="100%" border="1">
        <tr>
          <th scope="col">m Table</th>
          <th scope="col">Caption</th>
          <th scope="col">&nbsp;</th>
        </tr>
        <tbody com="data" table="_nm_table" where="n_table='[detail_table._table_id]'" property_modus="false" var="nm_table">
        <tr>
          <td>[nm_table.m_table]</td>
          <td>[nm_table.caption]</td>
          <td><a href="" com="delete_data" table="_nm_table" id="[_nm_table_id]">löschen</a></td>
          </tr>
        </tbody>
      </table>
      <p><a href="[system.base_url]/datenbank-table-edit?id=[detail_table._table_id]">Tabellen Eigenschaften</a> </p>
<p><a href="" com="create_searchindex" table="[detail_table.table_name]">Create Search Index</a></p>
<p><a href="scaffolding?table=[detail_table.table_name]">Scaffolding</a> </p>
      <p><a href="" com="empty_table" table="[table_name]" property_modus="false">Tabellen Inhalt löschen</a></p>
      <p><a href="" com="drop_table" table="[table_name]" property_modus="false">Tabelle löschen</a></p></td>
  </tr>
</table>
</body>
</html>
